<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html>
<html>
<head>
  <title>学生信息</title>
  <style type="text/css">
    table {
      border-collapse: collapse;
      width: 75%;
      border: 1px solid;
    }
    td {
      border: 1px solid;
    }
  </style>
</head>
<body>
<div align="center">
  <s:include value="add.jsp" />
  <s:a href="course">学生的课程成绩</s:a>
  <table>
    <tr>
      <th>学生id</th>
      <th>学生姓名</th>
      <th>学生性别</th>
      <th>操作</th>
    </tr>
    <s:if test="students.size>0">
      <s:iterator value="students" var="student">
        <tr>
          <td><s:property value="#student.studentId" /></td>
          <td><s:property value="#student.studentName" /></td>
          <td>
              <s:if test="#student.sex==1">
                <s:property value="'男'" />
              </s:if>
              <s:else>
                <s:property value="'女'" />
              </s:else>
            </td>
          <td>
            <s:a href="student!edit?student.studentId=%{#student.studentId}">编辑</s:a>
            <s:a href="student!remove?student.studentId=%{#student.studentId}">移除</s:a>
          </td>
        </tr>
      </s:iterator>
    </s:if>
  </table>
</div>
</body>
</html>
